package com.wswy.wzcx.ui.other

import android.util.Log
import com.che.libcommon.api.BaseResult
import com.che.libcommon.api.SimpleResultObserver
import com.che.libcommon.utils.RxBus
import com.wswy.wzcx.api.Api
import com.wswy.wzcx.model.MessageMode
import com.wswy.wzcx.module.InternalMsgCode

/**
 * Created by wangduheng26 on 2018/4/20.
 * wangduheng26@gmail.com
 */
object SimpleHttp {
    fun setReader(type: String) {
        Api.get().submitReady(type,MessageMode.getTypeId(type)).subscribe(object : SimpleResultObserver() {
            override fun onSuccess() {
                RxBus.getDefault().postWithCode(InternalMsgCode.CODE_MESSAGE_COUNT_CHANGE, "default")
            }
            override fun onApiError(result: BaseResult<*>?) {

            }
        })
    }
}